<?php
namespace app\shop31\model;

use think\Model;

class User  extends Model
{
    public function searchKeywordsAttr($q,$v)
    {
        $q->where('uname','like',"%{$v}%");
    }


    public static function getUserlist($where,$param)
    {
        $adv=User::
            withSearch(array_keys($where),$where)
            ->paginate([
                'list_rows'=>2,
                'query' => $param

        ]);
        return $adv;
    }
}
